//
//  SettingViewController.m
//  Eath
//
//  Created by yuhaya on 10/3/14.
//  Copyright (c) 2014 yuhaya. All rights reserved.
//

#import "SettingViewController.h"
#import "LeftViewController.h"
#import "CenterViewController.h"
#import "NavViewController.h"
#import "Tool.h"
#import "User.h"

@interface SettingViewController ()

@end

@implementation SettingViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.tabBarItem.title = @"设置";
        self.tabBarItem.image = [UIImage imageNamed:@"setting"];
        [self.tabBarItem.image imageWithRenderingMode:UIImageRenderingModeAutomatic];
        self.tabBarItem.selectedImage = [UIImage imageNamed:@"setting"];
        [self.tabBarItem.selectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    }
    return self;
}

- (void)viewDidLoad {
    
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.springAnimationOn = YES;
    
    LeftViewController * leftVC = [[LeftViewController alloc] init];
    NavViewController * nav;
    
    CenterViewController * centerVC = [[CenterViewController alloc] init];
    nav = [[NavViewController alloc] initWithRootViewController:centerVC];
    
    nav.navigationBar.translucent = NO;
    leftVC.delegate = nav;
    self.rightViewController = leftVC;
    self.centerViewController = nav;
    
    UIImageView * bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Bg"]];
    [bgImageView setContentMode:UIViewContentModeCenter];
    self.backgroundView = bgImageView;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
